//
//  ChartsTableView.m
//  Mtime
//
//  Created by Mac on 15/8/8.
//  Copyright (c) 2015年 wxk. All rights reserved.
//

#import "ChartsTableView.h"
#import "ChartsModel.h"
#import "ChartsHeaderView.h"

@implementation ChartsTableView

- (id)initWithFrame:(CGRect)frame {

    if (self = [super initWithFrame:frame]) {
        
        ChartsHeaderView *view = [[[NSBundle mainBundle] loadNibNamed:@"ChartsHeaderView" owner:nil options:nil] lastObject];
        
        self.tableHeaderView = view;
        
    }

    return self;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
    
    if (!cell) {
        
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
    }

    ChartsModel *model = self.dataList[indexPath.row];
    cell.textLabel.text = model.topListNameCn;
    cell.textLabel.textColor = [UIColor whiteColor];
    cell.backgroundColor = [UIColor clearColor];
    
    return cell;
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

    return 50;
}


@end
